package org.zhengquan.vo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

/**
 * @author zhengquan
 * @date 2017/11/3
 */
@Getter
@Setter
@ToString
public class RoleVO {

    private Integer id;

    @NotBlank(message = "角色名称不可以为空")
    @Length(min = 2, max = 20, message = "角色名称在2-20字之内")
    private String name;

    @NotNull(message = "必须角色的类型")
    @Range(min = 1, max = 2, message = "角色的类型不合法")
    private Short type;

    @NotNull(message = "必须指定角色的状态")
    @Range(min = 0, max = 2, message = "角色的状态不合法")
    private Short state;

    @Length(max = 150, message = "备注的长度在150个字之内")
    private String remark;
}
